package edu.sysu.cshare.dao;

import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="T_COMMENT")
public class Comment {
	public Comment(User commenter, String content, Calendar date, long id,
			Message message) {
		super();
		this.commenter = commenter;
		this.content = content;
		this.date = date;
		this.id = id;
		this.message = message;
	}
	public Comment() {
		super();
	}
	private User commenter;
	private String content;
	private Calendar date;
	private long id;
	private Message message;
	
	@ManyToOne
	public User getCommenter() {
		return commenter;
	}
	public String getContent() {
		return content;
	}
	public Calendar getDate() {
		return date;
	}
	@Id
	@GeneratedValue
	public long getId() {
		return id;
	}
	@ManyToOne
	public Message getMessage() {
		return message;
	}
	public void setCommenter(User commenter) {
		this.commenter = commenter;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public void setDate(Calendar date) {
		this.date = date;
	}
	public void setId(long id) {
		this.id = id;
	}
	public void setMessage(Message message) {
		this.message = message;
	}
}
